public class apple {
    static  String name = "苹果";
    static {
        System.out.println("static执行................");
        name = "香蕉";

    }

    {
        System.out.println("实列代码块执行..................");
    }
    String color;
    String weight;
    public apple() {
        this("红色","10斤");
        System.out.println("构造方法执行........................");
    }
    public apple(String color, String weight) {
        this.color = color;
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "apple{" +
                "color='" + color + '\'' +
                ", weight='" + weight + '\'' +
                '}';
    }

    public static void main(String[] args) {
       // System.out.println(apple.name);
        apple a = new apple();
        System.out.println(new apple());
//        System.out.println(name);
        //System.out.println(a.color);
        //System.out.println(a.weight);

    }


}
